<%-- 
    Document   : ListReceivedCar
    Created on : Nov 1, 2011, 11:58:01 PM
    Author     : Mr-aUgust
--%>

<%@page pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection, DAL.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <style type="text/css">
            #Table
            {
            border:1px solid green;
            }
            th
            {
            border:1px solid green;
            background-color:green;
            color:white;
            }
            .td
            {
            border:1px solid green;
            }
            .font
            {
            font-family:"Times New Roman", Times, serif;
            font-size:x-large;
            font-weight:bold;
            width:300px;
            margin-left:auto;
            margin-right:auto;
            color:#0707e7;
            }
            .a
            {
                color:#0707e7;
            }
        </style>
    </head>
    <body>
        <%
            CarBookBean cbb=new CarBookBean();
            Collection coll=cbb.SelectCarBookStatus();
            request.setAttribute("carb",coll);
        %>
    <div class="font">List Customer Received Car</div>  
        <table width="100%" id="Table">         
            <tr>
                <th>ID</th>
                <th>UserName</th>
                <th>CarID</th>
                <th>Driver</th>
                <th>Pick Up Date</th>
                <th>Drop Off Date</th>
                <th>Time</th>
                <th>Total Money</th>
                <th>DateBook</th>
                <th>Pay Car</th>
            </tr>
            <pg:paging pageSize="10" url="management.jsp?page=CarBooking"  >
                <c:forEach items="${carb}" var="cr">
                    <pg:item>
                        <tr>
                            <td class="td">${cr.bookingID}</td>
                            <td class="td" width="60px">${cr.userName}</td>
                            <td class="td">${cr.carID}</td>
                            <td class="td">${cr.driver}</td>
                            <td class="td">${cr.pickUpDate}</td>
                            <td class="td">${cr.dropOffDate}</td>
                            <td class="td">${cr.time}</td>
                            <td class="td"><f:formatNumber value="${cr.totalMoney}" pattern="$#,###" /></td>
                            <td class="td">${cr.dateBooking}</td>   
                            <td class="td">
                              <form action="../ControllerUpdateStatus" method="post">
                                <input type="hidden" name="bookingID" value="${cr.bookingID}" />
                                <input type="hidden" name="carID" value="${cr.carID}" />
                                <input type="submit" name="traxe" value="Pay Car"/>
                              </form>
                            </td>                            
                        </tr>
                    </pg:item>       
                </c:forEach>
                <pg:index>
                    <pg:page><%=thisPage%></pg:page>
                </pg:index>
            </pg:paging>
        </table>
        <br>
        <a class="a" href="management.jsp?page=ListRentalCar">List All Of Cars Rental</a>
    </body>
</html>

